package com.example.webbasic.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

/**
 * 有效：程序启动的时候输出信息
 * @author ben
 * @date 2021-11-06 20:33:47 CST
 */
@Component
public class AppContextRefreshedListener implements ApplicationListener<ContextRefreshedEvent> {

	@Override
	public void onApplicationEvent(ContextRefreshedEvent event) {
		System.out.println("ContextRefreshedEvent event=" + event + ", 刷新");
	}

}
